const QiniuManager = require("./src/utils/QiniuManager");
const path = require("path");
//generate mac
const accessKey = "yg4a5C-fNsb0FWh46ozkF-Jl1pKZn-qJ6u1PzF51";
const secretKey = "H22HNXBa3LLSRdh3OHNjo7yM926fXiCEHJ-IH761";
const key = "2.md";
const downloadPath = path.join(__dirname, key);
const manager = new QiniuManager(accessKey, secretKey, "cloud-markdown-you");
manager.uploadFile(key, downloadPath).then((data) => {
    console.log("上传成功", data);
});
//manager.deleteFile(key)
// manager.generateDownloadLink(key).then(data => {
//   console.log(data)
//   return manager.generateDownloadLink('first.md')
// }).then(data => {
//   console.log(data)
// })
//const publicBucketDomain = 'http://pv8m1mqyk.bkt.clouddn.com';

// manager.downloadFile(key, downloadPath).then(() => {
//   console.log('下载写入文件完毕')
// })
